<template>
  <div class="child">
    子组件
    <!-- <slot name="s1"></slot>
    <hr/>
    <slot name="s2"></slot> -->
    <slot text="我是数据传递">如果没有传递视图，则显示我</slot>
  </div>
</template>

<script>
export default {
  name: "child",
  data() {
    return {
      
    };
  }
};
</script>

<style scoped>
.ptest{color: crimson;}
</style>